var koa = require('koa');
var app = module.exports = koa();
var fresh = require('koa-fresh');
var etag = require('koa-etag');

// logger
app.use(require('./middleware/response-logger.js'));

//fresh
app.use(fresh());
app.use(etag());

// response.jsonp
app.use(require('./middleware/response-json.js'));

// route
require('./routes/index.js')(app);

app.listen(3001);